package models.ru.paralainer.chat.server.dto;

import java.util.ArrayList;
import java.util.List;

import models.ru.paralainer.chat.server.domain.Message;
import models.ru.paralainer.chat.server.enumeration.Status;

/**
 * User: stalov
 * Date: 20.07.12
 * Time: 18:53
 */
public class MessageListResponseDTO extends BaseResponseDTO {

    protected List<MessageDescription> messages;


    public MessageListResponseDTO(List<Message> messages) {
        super(Status.OK);
        this.messages = new ArrayList<MessageDescription>(messages.size());
        for (Message message : messages) {
            this.messages.add(new MessageDescription(message));
        }
    }
}
